<template>
  <div class="header">
    <h1>
        <img src="@/assets/img/image.png" alt="">
    </h1>
    <div class="search" @click="goSearch">
        <van-icon name="search" size="18px"/>
        <span>搜您喜欢的...</span>
    </div>
  </div>
</template>

<script>

export default {
    name: 'Header',
    methods:{
        goSearch(){
            this.$router.push('/searchIndex/');
            window.scrollTo(0, 0);
        }
    }
}
</script>

<style scoped>
.header {
    display: flex;
    justify-content: space-between;
    z-index: 999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #58c79d;
    /* align-items: center; */
}

.header h1{
    width: 160px;
    height: 50px;
    margin-left: 5px;
}
.header h1 img {
    width: 100%;
    height: 100%;
    margin-bottom: 6px;
    margin-left: 5px;
}
.search {
    width: 220px;
    height: 32px;
    margin-top: 20px;
    margin-right: 15px;
    background-color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding-left: 5px;
    
}
.search span {
    font-size: 14px;
    padding-left: 10px;
    color: #ccc;
}

</style>